Passing multiple arguments to a function with a dictionary